const util=require('util');

const f=async()=>'hello world';
const callbackFunctionF=util.callbackify(f);
callbackFunctionF((err,val)=>{
    if(err){
        throw err;
    }
    console.log(val);
});

const g=async()=>Promise.reject(null);
const callbackFunctionG=util.callbackify(g);
callbackFunctionG((err,val)=>{
    console.log(err.reason);
});
